package com.job.sun.HomeWork0712;

/**
 * @author 张春阳
 * @version 1.0
 * @since 2022-07-12 18:25:07
 * 工厂模式 判断老虎的攻击方式
 */
public class ChoiceAttack {

    public static Attack choice(String i){
        if(i.equals("1") ){
            return new Pounce();
        }else if(i.equals("2")){
            return new Lift();
        }else if (i.equals("3")){
            return new Cut();
        }else {
            return null;
    }
    }
}